<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="./style/js/sweetalert2@10.js"></script>
<!--<link rel="stylesheet" href="./style/css/sweetalert2.min.css">-->
<script type="text/javascript">
    window.onload = function () {
        // 1.1 获取需要的标签
        let as = document.getElementsByClassName('content-header')[0].getElementsByTagName('a');
        let contents = document.getElementsByClassName('dom');

        // 1.2 遍历
        for (let i = 0; i < as.length; i++) {
            // 1.2.1 取出单个对象
            let a = as[i];
            a.id = i;

            // 1.2.2 监听鼠标的移动事件
            a.onclick = function () {
                // 让所有的a的class都清除
                for (let j = 0; j < as.length; j++) {
                    as[j].className = '';
                    contents[j].style.display = 'none';
                }

                // 设置当前a的class
                this.className = 'current';
                // 从contents数组中取出对应的标签
                contents[this.id].style.display = 'block';
            }

        }
    }
    function changeReg() {
        let contents = document.getElementsByClassName('dom');
        contents[0].style.display = 'none';
        contents[1].style.display = 'block';
        document.getElementById("0").className = '';
        document.getElementById("1").className = 'current';
    }
</script>
<script type="text/javascript">
    window.onload = function () {
        const { value: formValues } = Swal.fire({
            title: 'Multiple inputs',
            html:
                '<input id="swal-input1" placeholder="请输入您的账号" class="swal2-input">' +
                '<input id="swal-input2" placeholder="请输入您的密码" class="swal2-input">',
            focusConfirm: false,
            preConfirm: () => {
                return [
                    document.getElementById('swal-input1').value,
                    document.getElementById('swal-input2').value
                ]
            }
        })
    }
</script>

</body>
</html>